package com.corejava.training.unitest;

import junit.framework.TestCase;

import org.junit.Test;

public class CalculatorTest {

	@Test
	public void testAdd() {

		Calculator cal = new Calculator();
		int result = cal.add(2, 4);
		TestCase.assertEquals(6, result);
	}

	@Test
	public void testSubtract() {
		Calculator cal = new Calculator();
		int result = cal.subtract(3, 2);
		TestCase.assertEquals(1, result);
	}

	@Test
	public void testMultiply() {
		Calculator cal = new Calculator();
		int result = cal.multiply(4, 3);
		TestCase.assertEquals(12, result);

	}

	@Test
	public void testDivide() {
		Calculator cal = new Calculator();
		int result = cal.divide(16, 2);
		TestCase.assertEquals(8, result);
	}

}
